<div id="order-pay-dialog" class="order-pay-dialog-c" style="width:400px;">
	<h3><span id="order-pay-dialog-close" class="close" onclick="return X.boxClose();">关闭</span></h3>
	<div style="overflow-x:hidden;padding:10px;" id="dialog-order-id" oid="{$order['id']}">
	<table width="96%" align="center" class="coupons-table">
	    
		<tr><td width="80"><b>用户信息：</b></td><td>{$user['email']}</td></tr>
		<tr><td><b>项目名称：</b></td><td>{$team['title']}</td></tr>
		<tr><td><b>购买数量：</b></td><td>{$order['quantity']}</td></tr>
	    <!--{if $order['condbuy']}-->
		<tr><td><b>购买选项：</b></td><td>{$order['condbuy']}</td></tr>
	    <!--{/if}-->
		<tr><td><b>付款状态：</b></td><td>{$paystate[$order['state']]}</td></tr>
		<tr><td><b>交易单号：</b></td><td>{$order['pay_id']}</td></tr>
		<tr><td><b>支付序号：</b></td><td>{$order['buy_id']}</td></tr>
		<tr><td><b>付款明细：</b></td><td><!--{if $order['credit']}-->余额支付 <b>${moneyit($order['credit'])}</b> 元<!--{/if}-->&nbsp;<!--{if $order['service']!='credit'&&$order['money']}-->{$payservice[$order['service']]}支付 <b>${moneyit($order['money'])}</b> 元<!--{/if}--><!--{if $order['card_id']}-->&nbsp;代金券：<b>${moneyit($order['card'])}</b> 元<!--{/if}--></td></tr>
		<tr><td><b>付款时间：</b></td><td>${date('Y-m-d H:i', $order['pay_time'])}</td></tr>
		<!--{if $user['mobile']}-->
		<tr><td><b>联系手机：</b></td><td>{$user['mobile']}</td></tr>
		
	    <!--{/if}-->
	<!--{if $team['delivery']=='express'}-->
		<tr><th colspan="2"><hr/></th></td>
		<tr><td width="100"><b>收件人：</b></td><td>{$order['realname']}</td></tr>
		<tr><td><b>手机号码：</b></td><td>{$order['mobile']}</td></tr>
		<tr><td><b>收件地址：</b></td><td>{$order['address']}</td></tr>
		<tr><td><b>快递公司id：</b></td><td>{$order['express_id']}</td></tr>
		<tr><td><b>快递公司：</b></td><td>{$order['express_name']}</td></tr>
	<!--{/if}-->
	<!--{if $team['delivery']=='coupon'}-->
	<tr><td><b>优惠券：</b></td>
		<td>
		<!--{loop $coupons $index $one}-->
		<input type="checkbox" value="{$one['id']}" name="quan" <!--{if $one['consume']=='Y'}-->disabled<!--{/if}--> > {$one['id']} &nbsp;&nbsp;<!--{if $one['consume']=='Y'}--><font color="green">已消费</font><!--{else}--><font color="red">未消费</font><!--{/if}-->
		<br />
		<!--{/loop}-->
		</td>
	</tr>
	<!--{/if}-->
	<!--{if $order['state']=='pay'}-->
		<tr><th colspan="2"><hr/></th></td>
		<tr><td><b>退款原因：</b></td><td>{$order['rereason']}</td></tr>
		<tr><td><b>退款时间：</b></td><td>${date('Y-m-d H:i:s',$order['retime'])}</td></tr>
		<tr><td><b>退款处理：</b></td><td><select name="refund" id="order-dialog-refund-id">${Utility::Option($option_refund, '', '请选择退款方式')}</select>&nbsp;<input type="submit" value="确定" <!--{if $team['delivery']=='coupon'}--> onclick="return X.manage.checkrefund();"/>
		<!--{else}-->
		onclick="return X.manage.orderrefund();"/>
		<!--{/if}-->
		</td></tr>
	<!--{/if}-->

	</table>
	</div>
</div>

<script type="text/javascript">
X.manage.checkrefund = function() {
    var rid = jQuery('#order-dialog-refund-id').val();
	var oid = jQuery('#dialog-order-id').attr('oid');
	var chk_value =[];    
	$('input[name="quan"]:checked').each(function(){    
	    chk_value.push($(this).val());    
	 }); 

	if(rid&&oid&&chk_value) return !X.get(WEB_ROOT + '/ajax/manage.php?action=refundcheck&id='+oid+'&cid='+chk_value+'&rid='+rid);
};
</script>
